module.exports = function(grunt){
    grunt.loadNpmTasks('grunt-contrib-concat');
    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-contrib-cssmin');
    grunt.loadNpmTasks('grunt-contrib-htmlmin');
    grunt.loadNpmTasks('grunt-contrib-copy');
    grunt.loadNpmTasks('grunt-contrib-clean');
    grunt.loadNpmTasks('grunt-contrib-compress');
    grunt.initConfig({
        pkg:grunt.file.readJSON("package.json"),
        concat:{
            options:{
                separator:"\r\n\r\n/*========================================*/\r\n\r\n",
                banner:"/*! <%=pkg.description%> - <%=pkg.author%> - <%=pkg.version%> */"
            },
            dist:{
                src:["www/js/index.js","www/js/jquery-2.0.3.js","www/js/popupInsert.js","www/js/slider.js"],
                dest:"game.js"
            }
        },
        uglify:{
            options:{
                banner:"/*! <%=pkg.description%> - <%=pkg.author%> - <%=pkg.version%> */"
            },
            game:{
                files:{
                    "dist/game.js":["game.js"]
                }
            }
        },
        watch:{
            game:{
                files:['js/*.js',"Gruntfile.js"],
                tasks:["concat","uglify"]
            }
        }
    })
    grunt.registerTask('default',["concat","uglify"]);
}